<template>
    <div>
        <!-- 侧边栏组件+右侧组件 -->
        <categoryCom :dataArr='dataArr'></categoryCom>
    </div>
</template>
<script>
import categoryCom from '@/components/categoryCom.vue'// 引入侧边栏组件
import { categoryList } from '@/api/category.js'// 引入axios封装接口
export default {
    data() {
        return {
            dataArr: ''
        }
    },
    components: {
        categoryCom
    },
    mounted() {
        this.getList()
    },
    methods: {
        async getList() {
            let res = await categoryList()
            this.dataArr = res.data.data.categoryList
        }
    }
}

</script>

<style scoped>

</style>